<template>
  <Dialog title="详情" v-model="dialogVisible" width="80%" append-to-body>
    <Info :data="data" class="mt4">
      <template #header>
        <div class="card-header">
          <CardTitle title="审核信息" />
        </div>
      </template>
    </Info>
  </Dialog>

  <!-- 表单弹窗：添加/修改 -->
  <Form ref="formRef" />
</template>

<script setup lang="ts">
import * as MatchmakerInfoApi from '@/api/blind/maker/MatchmakerInfo'
import Info from './components/Info.vue'

const dialogVisible = ref(false) // 弹窗的是否展示
const data = ref<MatchmakerInfoApi.MatchmakerInfoVO>({} as MatchmakerInfoApi.MatchmakerInfoVO)

/** 打开弹窗 */
const open = async (id?: number) => {
  dialogVisible.value = true
  // 修改时，设置数据
  if (id) {
    data.value = await MatchmakerInfoApi.getMatchmakerInfo(id)
  }
}
defineExpose({ open }) // 提供 open 方法，用于打开弹
</script>
<style scoped lang="scss">
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
